package com.lyc.common.entity;

import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

/**
 * 返回公共数据
 * @Author 李大神仙
 * @Date 2024/2/23 21:00
 * @Version 1.0
 */

@Data
public class BaseVo {
    //由于表的主键不是自增的，由框架生成的，但框架生成的是一串数字，当查询返回给前端时就会丢失精度，故加入@JsonSerialize
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime addTime;

    private Long addUser;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updTime;

    private Long updUser;

    private Integer isDelete;
}
